import request from '@/utils/request'

/**
 * 登录
 * @param {*} data
 * @returns
 */
export function loginApi(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

/**
 * 获取用户基本资料
 * @returns
 */
export function getUserInfoApi() {
  return request({
    url: '/sys/profile',
    method: 'post'
  })
}

/**
 * 获取用户详细资料
 * @returns
 */
export function getDetailUserInfoApi(id) {
  return request({
    url: '/sys/user/' + id,
    method: 'get'
  })
}

export function logoutApi() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
